home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 February / PCWFEB09.iso / Software / Linux / Kubuntu 8.10 / kubuntu-8.10-desktop-i386.iso / casper / filesystem.squashfs / lib / partman / update.d / 20bootable next >
Text File  |  2008-10-29  |  407b  |  35 lines

  1. #!/bin/sh
  2.  
  3. . /lib/partman/lib/base.sh
  4.  
  5. dev=$1
  6. num=$2
  7. id=$3
  8. size=$4
  9. type=$5
  10. fs=$6
  11. path=$7
  12. name=$8
  13.  
  14. cd $dev
  15.  
  16. if [ $fs = free ]; then
  17.     rm -f $id/bootable
  18. else
  19.     bootable=no
  20.     open_dialog GET_FLAGS $id
  21.     while { read_line flag; [ "$flag" ]; }; do
  22.         if [ "$flag" = boot ]; then
  23.             bootable=yes
  24.         fi
  25.     done
  26.     close_dialog
  27.  
  28.     if [ $bootable = yes ]; then
  29.         mkdir -p $id
  30.         >$id/bootable
  31.     else
  32.         rm -f $id/bootable
  33.     fi
  34. fi
  35.